package com.turtle3d.formallanguage.grammar;

import java.util.ArrayList;

import com.turtle3d.formallanguage.symbol.Symbol;
import com.turtle3d.formallanguage.symbol.SymbolClass;


public class Production
{
	private Symbol leftSide;
	private ArrayList<SymbolClass> rightSide;
	
	private float probability = 1f;
	
	public Production(){}
	
	/*public LProduction(char leftSide, char[] rightSide){
		this.leftSide = new LSymbol(new Character(leftSide).toString());
		
		this.rightSide = new ArrayList<LSymbol>();
		
		for(int i=0;i<rightSide.length;i++)
			this.rightSide.add(new LSymbol(new Character(rightSide[i]).toString()));
		
	}*/
	
	public Symbol getLeftSide()
	{
		return leftSide;
	}
	public void setLeftSide(Symbol leftSide)
	{
		this.leftSide = leftSide;
	}
	public ArrayList<SymbolClass> getRightSide()
	{
		return rightSide;
	}
	public void setRightSide(ArrayList<SymbolClass> rightSide)
	{
		this.rightSide = rightSide;
	}

	public float getProbability()
	{
		return probability;
	}

	public void setProbability(float probability)
	{
		this.probability = probability;
	}
	
	/*@Override
	public int hashCode()
	{
		return leftSide.hashCode();
	}*/
	
	
}
